<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			form {
				position: relative;
				top: 50px;
				left: 500px;
			}

			input[name="word"] {
				height: 30px;
				width: 600px;
				border: skyblue solid 1px;
			}

			input[type="submit"] {
				border: skyblue solid 1px;
				background-color: royalblue;
				height: 35px;
				width: 100px;
				color: white;
				position: relative;
				right: 6px;
				top: 1px;
			}

			p {
				height: 32px;
				position: relative;
				left: 380px;
				width: 120px;
				background-image: url(img/baidu_web.png);
				background-repeat: no-repeat;
				background-position-x: 1em;
				background-position-y: 1px;
			}

			#d1 {
				position: relative;
				left: 500px;
			}
		</style>
		<script type="text/javascript">
			function h() {
				var s = document.getElementById("sou")
				var s1 = document.getElementsByName("sousuo")
				var f = document.getElementById("f")
				for (var i of s1) {
					if (i.checked) {
						break;
					}
				}
				if (i.value == "baidu") {
					s.style.background = "url(img/baidu_web.png) no-repeat 1em ";
					f.action = "http://www.baidu.com/baidu"
					f.firstElementChild.name="word"
				} else if (i.value == "guge") {
					s.style.background = "url(img/google_web-444.png) no-repeat 1em";
					f.action = "https://so.bban.fun/search"
					f.firstElementChild.name="q"
				} else if (i.value == "taobao") {
					s.style.background = "url(img/taobao_shopping-446.png) no-repeat 1em";
					f.action = "https://s.taobao.com/search"
					f.firstElementChild.name="q"
				}
			}
		</script>
	</head>
	<body>
		<form action="http://www.baidu.com/baidu" target="_blank" id="f">
			<input name="word" size="30">
			<input type="submit" value="搜索">
		</form>
		<p id="sou"></p>
		<div id="d1">
			<input type="radio" name="sousuo" value="baidu" onclick="h()" />百度
			<input type="radio" name="sousuo" value="guge" onclick="h()" />谷歌
			<input type="radio" name="sousuo" value="taobao" onclick="h()" />淘宝
		</div>
	</body>
</html>
